package cn.sdormitory.report.service.impl;

import cn.sdormitory.report.dao.MorningExercisesStaDao;
import cn.sdormitory.report.req.MorningExercisesStaReq;
import cn.sdormitory.report.service.MorningExercisesStaService;
import cn.sdormitory.report.vo.MorningExercisesStaVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author : yy
 * @date: 2025/4/12 8:32
 * @description:
 */
@Service
public class MorningExercisesStaServiceImpl implements MorningExercisesStaService {
    @Resource
    private MorningExercisesStaDao morningExercisesStaDao;

    @Override
    public IPage<MorningExercisesStaVO> list(MorningExercisesStaReq exercisesStaReq) {
        IPage<MorningExercisesStaVO> page =  new Page<>(exercisesStaReq.getPageNum(), exercisesStaReq.getPageSize());
        morningExercisesStaDao.list(page, exercisesStaReq);
        return page;
    }

    @Override
    public List<MorningExercisesStaVO> export(MorningExercisesStaReq exercisesStaReq) {
        return morningExercisesStaDao.export(exercisesStaReq);
    }
}
